#include<iostream>
#include<string>
using namespace std;
#include<algorithm>

class Solution {
public:
    bool isAnagram(string s, string t) {
        int s_size = s.size();
        int t_size = t.size();
        if (s_size != t_size) {
            return false;
        }
        sort(s.begin(),s.end());
        sort(t.begin(), t.end());
        if (s.compare(t) == 0) {
            return true;
        }
        else {
            return false;
        }
    }
};